<?php
	//引用config.php文件，路径根据实际情况自行定义
	include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'aliyun-php-sdk-core'.DIRECTORY_SEPARATOR.'Config.php');

use Cdn\Request\V20141111 as cdn;

	$included_files = get_included_files();
	foreach ($included_files as $filename) {
		echo "<pre>";
			print_r($filename);
		echo "</pre>";
	}
	
	$accessKeyId = 'LTAIO04RHCKvNCYr';
	$accessSecret = '0wfyqsjfVDkIXgvJpWk43DPfDw6a8e';
	//$accessKeyId，$accessSecret为阿里云密钥
	$iClientProfile = DefaultProfile::getProfile("cn-hangzhou", $accessKeyId, $accessSecret);
	$client = new DefaultAcsClient($iClientProfile);
	// exit;


	//初始化直播的具体操作，DescribeLiveRecordConfigRequest是获取直播云下面，所有的创建的app
	$request = new cdn\DescribeLiveRecordConfigRequest();

	echo "<pre>";
		print_r($request);
	echo "</pre>";

	$request ->setDomainName('live.ezoon.cn');
	// $request->setAppName($appname);
	$request->setOssEndpoint('oss-cn-hangzhou.aliyuncs.com');
	$request->setOssBucket('liveplaybucket');
	$request->setOssObjectPrefix('record/'.$appname.'/{StreamName}/{UnixTimestamp}_{Sequence}');
	 
	//针对阿里云进行请求
	 $response = $this->client->getAcsResponse($request);

	 print_r("\r\n");
	 print_r($response);